package models

import "time"

var PapPayApplyStatus map[int]string

// 申请扣款记录
type PapPayApplyRecord struct {
	Id            int64     `orm:"description(自增主键)"`
	Sn            string    `orm:"description(流水号)"`
	User          *User     `orm:"rel(fk);null;default(0);description(会员id)"`
	Student       *Student  `orm:"rel(fk);null;default(0);description(学生id)"`
	Amount        float64   `orm:"digits(12);decimals(2);description(扣款金额)"`
	Status        int       `orm:"description(扣款状态，0未知 1成功 2失败)"`
	StatusShow    string    `orm:"-"`
	FailMsg       string    `orm:"description(扣款失败信息)"`
	BankType      string    `orm:"description(付款银行)"`
	TransactionId string    `orm:"description(微信支付订单号)"`
	CreatedDate   time.Time `orm:"auto_now_add;type(date);description(创建日期)"`
	Created       time.Time `orm:"auto_now_add;type(datetime);description(创建时间)"`
	CreatedShow   string    `orm:"-"`
}

func init() {
	PapPayApplyStatus = map[int]string{
		0: "未知",
		1: "扣款成功",
		2: "扣款失败",
	}
}
